//
// Created by wkm on 2023-12-03.
//

#ifndef MYSYSTEMCLEARNING_INCR_H
#define MYSYSTEMCLEARNING_INCR_H

#include "systemc.h"

const int BITS = 2;

SC_MODULE(incr) {
    sc_in<bool> phy;
    sc_in<sc_uint<BITS> > one_count;
    sc_out<sc_uint<BITS> > z;

    void prc_incr();

    SC_CTOR(incr) {
        SC_METHOD(prc_incr);
        reinterpret_cast<ostream &>(sensitive_pos << phy) << one_count;
        // 书上这行代码是sensitive_pos << phy << one_count;
    }
};

#endif //MYSYSTEMCLEARNING_INCR_H
